/*
File:		ParticleManager.h
Author:		Skyler Suzuki
Purpose:	CParticleManager class handles all loaded particle effects 
			and active effects that need to updated to the screen
*/

#pragma once
#include <map>
#include <vector>
#include <string>

#include "Emitter.h"
#include "Particle.h"

class CParticleManager
{
public:

	// Singleton
	static CParticleManager*	GetInstance();
	static void					DeleteInstance();

	bool		LoadParticle(const char* szFileName);
	
	void AddEmitter( CEmitter* test );
	void ActivateEmitter( std::string nAEmitter );
	void RemoveEmitter( CEmitter* ptr );
	void UpdateActiveEmitter(float fElapsedTime);
	void RenderAll();
private:

	// Singleton
	static CParticleManager*	s_pInstance;
	CParticleManager(void);
	~CParticleManager(void);
	CParticleManager( const CParticleManager& );
	CParticleManager& operator= (const CParticleManager& );

	// Map of Emitter
	std::map<std::string, CEmitter>		m_mapLoadedEffects;
	std::vector<CEmitter*>				m_vActiveEffects;

	bool								m_bIterating;
};

